refactor(@inquirer/core): replace wrap-ansi with fast-wrap-ansi#1981
Merged
SBoudrias merged 2 commits intoSBoudrias:mainfrom Feb 3, 2026
Merged
Conversation
Replaces wrap-ansi with fast-wrap-ansi for improved performance. fast-wrap-ansi claims to be 10x faster while being half the size. Closes SBoudrias#1799
Update the lockfile to include the new fast-wrap-ansi dependency and properly remove wrap-ansi from @inquirer/core.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1981 +/- ##
=======================================
Coverage ? 94.85%
=======================================
Files ? 37
Lines ? 1555
Branches ? 456
=======================================
Hits ? 1475
Misses ? 78
Partials ? 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Owner
|
Thanks! Do you know if this lib is tracking this bug from wrap-ansi? #1943 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces
wrap-ansiwithfast-wrap-ansiin@inquirer/core.Changes
wrap-ansidependency withfast-wrap-ansiWhy?
As mentioned in #1799,
fast-wrap-ansiclaims to be:wrap-ansi(benchmarks included in the repo)wrap-ansi@inquirer/core's requirementsCompatibility
fast-wrap-ansisupports the same options aswrap-ansi:trimwordWraphardThe only difference is the export style (named vs default), which has been updated accordingly.
Closes #1799